<extend name="Public/common"/>
<block name="othercss"> 
<style>
    /*.header .all ul {*/
    /*    display: block !important;*/
    /*}*/
    /*.footer{*/
    /*    background-color: #f4f4f4;*/
    /*}*/
</style>
</block>
<block name="body">
 <div class="main">
    <!--banner-->
    <div class="banner-index">
    <volist name="banner" id="item">
        <a href="{$item.url}" style="background-image: url('__ROOT__{$item.picture}')"></a>
     </volist>
    </div>
    <!--end banner-->
    <!--pro1-->
     {$index_block}
    
    <!--end pro1-->
    <div class="index-pro">
        <div class="navs">
            <div class="dh">导航</div>
           <foreach name="menu_cat" item="menu_item">
            <a onclick="click_scroll('#line{$key+1}')" id="navs{$key+1}">{$menu_item.cat_name}</a>
            </foreach> 
            <a class="zhiding" href="javascript:goTop1();"><i></i></a>
        </div>
        <!--pro2-->
        
        <!--end pro2-->
    </div>
</div>
<!--end mian-->
<!--footer-->

<!--end  footer-->
<!--top-->
<include file="Public:right"/>
<!--end  top-->
</block>
  <block name="otherjs">
<script>
    function banner(name,arrow,dots,fade,speed,autoplays,autoplay,infinite){
        $(name).slick({
            arrows: arrow,
            dots: dots,
            fade: fade,
            speed: speed,
            autoplaySpeed: autoplays,
            autoplay: autoplay,
            infinite: infinite
        });
    }
    $(function(){
        banner('.banner-index',false,false,true,500,3500,true,true);
        banner('.pros .t1',false,true,false,500,3500,true,true);
    });

    //侧边栏悬停
    window.onload = function () {
        var nav = $(".navs"); //得到导航对象
        var win = $(window); //得到窗口对象
        var sc = $(document); //得到document文档对象。
        win.scroll(function () {
            if (sc.scrollTop() >= 1300) {
                nav.addClass("on");
            } else {
                nav.removeClass("on");
            }
        })
    }
    click_scroll = function (val){
        var scroll_offset = $(val).offset();
        $("body,html").animate({
            scrollTop: scroll_offset.top - 0
        }, 400);
    }
    //缓缓返回顶部
    function goTop1() {
        $('html,body').animate({
            'scrollTop': 1320
        }, 600);
    }
</script>
</block>
